package com.itheima.dao;

import com.github.pagehelper.Page;
import com.itheima.pojo.Role;

import java.util.List;
import java.util.Map;
import java.util.Set;

/**
 * @author ：wanghao
 * @date ：Created in 2020/12/4
 * @description ：角色Dao层接口
 * @version: 1.0
 */
public interface RoleDao {
    public Set<Role> findByUserId(Integer userId);
    public Page<Role> selectByCondition(String queryString);
    public void add(Role role);
    public void setRoleAndMenu(Map<String, Integer> map);
    public void setRoleAndPermission(Map<String, Integer> map);
    public Role findById(Integer id);
    public List<Integer> findRoleAndMenu(Integer roleId);
    public List<Integer> findRoleAndPermission(Integer roleId);
    public void deleteRoleAndMenu(Integer id);
    public void deleteRoleAndPermission(Integer id);
    public void update(Role role);
    public Integer findCountUserByRoleId(Integer id);
    public void deleteById(Integer id);
    public List<Role> findAll();
}
